package com.fm.openinstall.a;

import java.util.concurrent.*;
import com.fm.openinstall.c.*;

class h extends s
{
    final /* synthetic */ String a;
    final /* synthetic */ f b;

    h(final f b, final ExecutorService executorService, final q q, final long n, final String a) {
        this.b = b;
        this.a = a;
        super(executorService, q, n);
    }

    @Override
    public b a(final long n) {
        b a;
        if ((a = this.b.a(n)) == null) {
            b b;
            String s;
            if (!this.b.g.e()) {
                b = new b(com.fm.openinstall.c.c.c, -20);
                s = "EventStatsEnabled is disable";
            }
            else if (!com.fm.openinstall.c.d.a(this.b.k)) {
                b = new b(com.fm.openinstall.c.c.b, -10);
                s = "network unavailable";
            }
            else {
                final a b2 = this.b.b();
                final String a2 = this.b.a("stats/events");
                final f b3 = this.b;
                final b a3 = b2.a(a2, b3.a(b3.k), this.a);
                this.b.b(a3.e());
                a = a3;
                if (a3.a() == com.fm.openinstall.c.c.a) {
                    this.b.i.c();
                    a = a3;
                    return a;
                }
                return a;
            }
            b.b(s);
            return b;
        }
        return a;
    }
}
